package com.zhentao.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.common.dtos.WdYhjDto;
import com.zhentao.model.common.pojo.coupon.CdzUserCoupon;
import com.zhentao.model.common.pojo.station.StationInformation;
import com.zhentao.model.common.pojo.yhj.Yhj;
import com.zhentao.service.StationInformationService;
import com.zhentao.mapper.StationInformationMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author 岳大大
* @description 针对表【station_Information】的数据库操作Service实现
* @createDate 2024-12-19 13:56:08
*/
@Service
public class StationInformationServiceImpl extends ServiceImpl<StationInformationMapper, StationInformation>
    implements StationInformationService{
    @Resource
    private StationInformationMapper stationInformationMapper;
    @Override
    public ResponseResult listStation(Long userId, String stationName, Boolean washFee,
                                      Boolean shoppingMall, Boolean lounge, Boolean restroom,
                                      Boolean carWash) {

        // 调用 Mapper 方法，传入筛选条件
        List<StationInformation> list = stationInformationMapper.listId(userId, stationName, washFee,
                shoppingMall, lounge, restroom, carWash);
        return ResponseResult.okResult(list);
    }

    @Override
    public ResponseResult collect(Long userId) {
        List<StationInformation> list=stationInformationMapper.list(userId);
        return ResponseResult.okResult(list);
    }

    @Override
    public ResponseResult ShouId(Integer id) {
            int a=stationInformationMapper.ShouId(id);
        return ResponseResult.okResult(a);
    }

    @Override
    public ResponseResult detail() {
        List<StationInformation> list = this.list();
        return ResponseResult.okResult(list);
    }

    @Override
    public ResponseResult QuXiaoShou(Integer id) {
        int a=stationInformationMapper.ShouId1(id);
        return ResponseResult.okResult(a);
    }

    @Override
    public ResponseResult listwd(Long userId) {

        List<WdYhjDto> list = stationInformationMapper.listwd(userId);
        return ResponseResult.okResult(list);
    }
}




